package cn.zwz.data.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@TableName("a_orders")
public class OrdersEntity<T> implements Serializable {
        private Long id;
        @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
        private Date addtime;
        private String orderid;
        private String tablename; // 可选字段，可删
        private Long userid;
        private List<CartItem> items; // 购物车商品列表
        private String status;
        private String address;
        private Integer type;

        // 新增字段用于存储总价格和折扣价格
        private Float total;
        private Float discounttotal;

        // 新增字段用于存储商品信息JSON字符串（数据库）
        private String itemsJson;

        // Getter / Setter
    }